package com.wtwd.campus.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wtwd.campus.entity.Notification;
import com.wtwd.campus.entity.NotificationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface NotificationMapper {
    IPage<Notification> getNotificationListByCondition(@Param("data") NotificationVO data, @Param("page") Page<Notification> page);

    Map<String,Object> getSchoolAndGradeMessByClassId(@Param("classId") Integer classId);

    int addNotification(@Param("data") Notification data);

    int addNotificationWx(@Param("data") Notification data);

    Notification getNotificationById(@Param("id") Integer id);

    Long getLatestNotificationTimeByClassId(@Param("classId") Integer classId);

    List<Notification> getNotificationByTimeAndStuId(@Param("classId") Integer classId,@Param("start") Long start,@Param("end")  Long end,@Param("min") Integer min);

}
